输入框自动切换中文(C#,winform),vs2013 string[] languagename = new string[] { "五笔", "拼音", "中文" };
bool bResult = false;
for (int i = 0; i < languagename.Length; i )
{
foreach (InputLanguage lang in InputLanguage.InstalledInputLanguages)
{
if (lang.LayoutName.IndexOf(languagename[i]) >= 0)
{
InputLanguage.CurrentInputLanguage = lang;
bResult = true;
break;
}
}
评论